package wnhz.com.business.groupshop.ui;

import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.WindowManager;

import butterknife.BindView;
import butterknife.ButterKnife;
import wnhz.com.business.R;
import wnhz.com.business.base.BaseActivity;
import wnhz.com.business.impl.ActionBarClickListener;
import wnhz.com.business.view.TranslucentActionBar;

/**
 * 选择银行卡
 */
public class CardChooseActivity extends BaseActivity implements ActionBarClickListener {

    @BindView(R.id.actionbar)
    TranslucentActionBar actionbar;
    @BindView(R.id.recycler_card)
    RecyclerView recyclerCard;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_card_choose);
        ButterKnife.bind(this);
        actionbar.setData("选择银行卡", R.drawable.ic_lefft_white, null,R.drawable.ic_card_add, null,0 , this);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            actionbar.setStatusBarHeight(getStatusBarHeight());
        }
        initview();
    }

    public static Intent createIntent(Context context) {
        Intent intent = new Intent(context, CardChooseActivity.class);
        return intent;
    }

    private void initview()
    {
        recyclerCard.setLayoutManager(new LinearLayoutManager(this,LinearLayoutManager.VERTICAL,false));
    }

    @Override
    public void onLeftClick() {
        finish();

    }

    @Override
    public void onRightClick() {
        startActivity(AddBankCardActivity.createIntent(this));
    }

    @Override
    public void onEditTextClick() {

    }
}
